export const fetchProduct = () => fetch('/api/data/index.json').then(body => body.json())

export const loginApi = (params) => fetch('/api/users/login', {
    method: 'post',
    headers: {
        'content-type': 'application/json'
    },
    body: JSON.stringify(params)
})
    .then(body => body.json())